package com.ruoyi.project.search.viewInStockHistroy.service.impl;

import java.util.List;

import com.ruoyi.project.search.viewInStockHistroy.domain.ViewInStockHistory;
import com.ruoyi.project.search.viewInStockHistroy.mapper.ViewInStockHistoryMapper;
import com.ruoyi.project.search.viewInStockHistroy.service.IViewInStockHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 入库单据历史Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-29
 */
@Service
public class ViewInStockHistoryServiceImpl implements IViewInStockHistoryService
{
    @Autowired
    private ViewInStockHistoryMapper viewInStockHistoryMapper;

    /**
     * 查询入库单据历史
     * 
     * @param stockinId 入库单据历史主键
     * @return 入库单据历史
     */
    @Override
    public ViewInStockHistory selectViewInStockHistoryByStockinId(String stockinId)
    {
        return viewInStockHistoryMapper.selectViewInStockHistoryByStockinId(stockinId);
    }

    /**
     * 查询入库单据历史列表
     * 
     * @param viewInStockHistory 入库单据历史
     * @return 入库单据历史
     */
    @Override
    public List<ViewInStockHistory> selectViewInStockHistoryList(ViewInStockHistory viewInStockHistory)
    {
        return viewInStockHistoryMapper.selectViewInStockHistoryList(viewInStockHistory);
    }

    /**
     * 新增入库单据历史
     * 
     * @param viewInStockHistory 入库单据历史
     * @return 结果
     */
    @Override
    public int insertViewInStockHistory(ViewInStockHistory viewInStockHistory)
    {
        return viewInStockHistoryMapper.insertViewInStockHistory(viewInStockHistory);
    }

    /**
     * 修改入库单据历史
     * 
     * @param viewInStockHistory 入库单据历史
     * @return 结果
     */
    @Override
    public int updateViewInStockHistory(ViewInStockHistory viewInStockHistory)
    {
        return viewInStockHistoryMapper.updateViewInStockHistory(viewInStockHistory);
    }

    /**
     * 批量删除入库单据历史
     * 
     * @param stockinIds 需要删除的入库单据历史主键
     * @return 结果
     */
    @Override
    public int deleteViewInStockHistoryByStockinIds(String stockinIds)
    {
        return viewInStockHistoryMapper.deleteViewInStockHistoryByStockinIds(Convert.toStrArray(stockinIds));
    }

    /**
     * 删除入库单据历史信息
     * 
     * @param stockinId 入库单据历史主键
     * @return 结果
     */
    @Override
    public int deleteViewInStockHistoryByStockinId(String stockinId)
    {
        return viewInStockHistoryMapper.deleteViewInStockHistoryByStockinId(stockinId);
    }
}
